﻿<UserControl x:Class="ITG.TabPropertiesView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:utility="clr-namespace:DALT.Utility;assembly=DALT.Utility"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <TabControl 
            SelectedIndex="{Binding ActiveTab.Index, Mode=OneWay}"
            ItemsSource="{Binding Tabs}">
            <TabControl.ContentTemplate>
                <DataTemplate>
                    <Grid 
                                                  Margin="0 5 5 0">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>

                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>




                        <TextBlock Text="Tab Name" Grid.Row="0" Margin="5 0 5 0" />
                        <!--
                        <TextBox Text="{Binding Path=Name, Mode=TwoWay}" utility:InputBindingsManager.UpdatePropertySourceWhenEnterPressedProperty="TextBox.Text" 
                                                         Grid.Row="0" Grid.Column="1" Margin="5 0 0 5" />-->

                        <TextBlock Text="Tab Index" Grid.Row="1" Margin="5 0 5 0" />
                        <TextBlock Text="{Binding Path=Index, Mode=OneWay}" Grid.Row="1" Grid.Column="1" Margin="5 0 5 0" />

                        <Button Content="Remove Tab" Command="{Binding RemoveTabCommand}"
                                                        Grid.Row="2" Grid.Column="0" Margin="5 0 0 5" 
                                                        IsEnabled="False" ToolTip="Remove the current tab with all its contents."/>

                        <Button Content="Validate Tab" Command="{Binding ValidateTabCommand}"
                                                        Grid.Row="2" Grid.Column="1" Margin="5 0 0 5" 
                                                        IsEnabled="False" ToolTip="Remove the current tab with all its contents."/>

                    </Grid>
                </DataTemplate>
            </TabControl.ContentTemplate>
            
        </TabControl>
    </Grid>
</UserControl>
